package com.cloud.pole.advert.model.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Id;

/**
 * @author 
 */
public class AdvertPos implements Serializable {
    /**
     * 类型ID
     */
    @Id
    private Integer advertPosId;

    /**
     * 类型名称
     */
    private String posName;

    /**
     * 状态（1：有效 0：无效）
     */
    private Integer posStatus;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 说明
     */
    private String posDesc;

    private static final long serialVersionUID = 1L;

    public Integer getAdvertPosId() {
        return advertPosId;
    }

    public void setAdvertPosId(Integer advertPosId) {
        this.advertPosId = advertPosId;
    }

    public String getPosName() {
        return posName;
    }

    public void setPosName(String posName) {
        this.posName = posName;
    }

    public Integer getPosStatus() {
        return posStatus;
    }

    public void setPosStatus(Integer posStatus) {
        this.posStatus = posStatus;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getPosDesc() {
        return posDesc;
    }

    public void setPosDesc(String posDesc) {
        this.posDesc = posDesc;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AdvertPos other = (AdvertPos) that;
        return (this.getAdvertPosId() == null ? other.getAdvertPosId() == null : this.getAdvertPosId().equals(other.getAdvertPosId()))
            && (this.getPosName() == null ? other.getPosName() == null : this.getPosName().equals(other.getPosName()))
            && (this.getPosStatus() == null ? other.getPosStatus() == null : this.getPosStatus().equals(other.getPosStatus()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getPosDesc() == null ? other.getPosDesc() == null : this.getPosDesc().equals(other.getPosDesc()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAdvertPosId() == null) ? 0 : getAdvertPosId().hashCode());
        result = prime * result + ((getPosName() == null) ? 0 : getPosName().hashCode());
        result = prime * result + ((getPosStatus() == null) ? 0 : getPosStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getPosDesc() == null) ? 0 : getPosDesc().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", advertPosId=").append(advertPosId);
        sb.append(", posName=").append(posName);
        sb.append(", posStatus=").append(posStatus);
        sb.append(", createTime=").append(createTime);
        sb.append(", posDesc=").append(posDesc);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}